﻿<Window x:Class="Attacher.SelectInstanceWindow"
        
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
		xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
		xmlns:attacher="clr-namespace:Attacher"

		mc:Ignorable="d" 
        
        Title="Select Visual Studio instance to attach to ..." 
        SizeToContent="WidthAndHeight" 
        ResizeMode="NoResize"
        ShowInTaskbar="True"
        WindowStartupLocation="CenterScreen" 

        FocusManager.FocusedElement="{Binding ElementName=InstancesListView}"
        
        MinWidth="400"
        MinHeight="100" >
    
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <ListView Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="3" Padding="3" ItemsSource="{Binding Instances}" SelectedItem="{Binding SelectedInstance}" DisplayMemberPath="Title" x:Name="InstancesListView" />
        <Separator Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Margin="3" />
        <UniformGrid Grid.Row="2" Grid.Column="1" Rows="1" Columns="2" Margin="3" >
            <Button Content="Accept" IsDefault="True" Padding="3" Margin="3,0,3,0" attacher:DialogButtonManager.IsAcceptButton="True" />
            <Button Content="Cancel" IsCancel="True" Padding="3" Margin="3,0,3,0" attacher:DialogButtonManager.IsCancelButton="True" />
        </UniformGrid>
    </Grid>
</Window>
